import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"
// 型体查询
export const RdTypeBodyFileList = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/styleList`,parms)
}

// 新增型体
export const RdTypeBodyFileAdd = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/addStyle?pageNum=${parms.currentPage}&pageSize=${parms.pageSize}`,parms) 
}

// 打勾检核
export const RdTypeBodyFileCheck = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/check`,parms) 
}

// 取消检核
export const RdTypeBodyFileCancelCheck = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/cancelCheck`,parms) 
}

// 删除
export const RdTypeBodyFileDelete = (parms:any) => {
    return service.delete<any,any>(`/mes/kfStyle/delStyle/${parms}`) 
}

// 修改
export const RdTypeBodyFileEdit = (parms:any) => {
    return service.put<any,any>(`/mes/kfStyle/updateStyle`,parms)
}

// 码制数据
export const RdTypeBodyFileCode = () => {
    return service.get<any,any>(`/mes/kfStyle/sizeTypeByName`) 
}

// 复制
export const RdTypeBodyFileCopy = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/copyStyle?id=${parms.id}&newStyleNo=${parms.newStyleNo}`) 
}

// 型体配色资料查询
export const RdTypeBodyFileColorList = (parms:any) => {
    return service.get<any,any>(`/mes/kfStyle/styleColorList?styleNo=${parms}`)
}

// 配色资料新增
export const RdTypeBodyFileColorAdd = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/addStyleColor`,parms) 
}

// 配色资料删除
export const RdTypeBodyFileColorDelete = (parms:any) => {
    return service.delete<any,any>(`/mes/kfStyle/delStyleColor/${parms}`)
}

// 配色资料修改
export const RdTypeBodyFileColorEdit = (parms:any) => {
    return service.put<any,any>(`/mes/kfStyle/updateStyleColor`,parms)
}

// 配码资料新增
export const RdTypeBodyFileCodeAdd = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/addStyleSize`,parms) 
}

// 配码资料查询
export const RdTypeBodyFileCodeList = (parms:any) => {
    return service.get<any,any>(`/mes/kfStyle/styleSizeList?styleNo=${parms}`) 
}

// 配码号查询
export const RdTypeBodyFileCodeNum = (id:any) => {
    return service.get<any,any>(`/mes/kfStyle/sizeListByStyle?sizeType=${id.sizeCode}&styleNo=${id.styleNo}`) 
}

// 配码资料删除
export const RdTypeBodyFileCodeDelete = (parms:any) => {
    return service.delete<any,any>(`/mes/kfStyle/delStyleSize/${parms}`)
}

// 配码资料修改
export const RdTypeBodyFileCodeEdit = (parms:any) => {
    return service.put<any,any>(`/mes/kfStyle/updateStyleSize`,parms)  
}

// 生成订购单号
export const RdTypeBodyFileOrderNum = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/createOrderId`,parms)
}

// 大图细节补充添加
export const RdTypeBodyFileAddDetail = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/addStyleColorPhoto`,parms) 
}

// 大图细节查询
export const RdTypeBodyFileDetailList = (parms:any) => {
    return service.get<any,any>(`/mes/kfStyle/styleColorPhotoList?styleNo=${parms.styleNo}&styleColor=${parms.styleColor}`) 
}

// 大图细节删除
export const RdTypeBodyFileDetailDelete = (parms:any) => {
    return service.delete<any,any>(`/mes/kfStyle/delStyleColorPhoto/${parms}`)
}

// 大图细节修改
export const RdTypeBodyFileDetailEdit = (parms:any) => {
    return service.put<any,any>(`/mes/kfStyle/updateStyleColorPhoto`,parms)
}

// 生成订单查询
export const RdTypeBodyFileOrderList = (parms:any) => {
    return service.post<any,any>(`/mes/pc/orderHead/list`,parms) 
}

// 工艺数据添加
export const RdTypeBodyFileAddCraft = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/addStyleProcessData`,parms) 
}

// 工艺数据查询
export const RdTypeBodyFileCraftList = (parms:any) => {
    return service.post<any,any>(`/mes/kfStyle/styleProcessData`,parms)
}

// 工艺数据删除
export const RdTypeBodyFileCraftDelete = (parms:any) => {
    return service.delete<any,any>(`/mes/kfStyle/delStyleProcessData/${parms}`) 
}

// 工艺数据修改
export const RdTypeBodyFileCraftEdit = (parms:any) => {
    return service.put<any,any>(`/mes/kfStyle/updateStyleProcessData`,parms)
}

// 样品类型数据
export const RdTypeBodyFileSampleType = () => {
    return service.get<any,any>(`/mes/kfStyle/typeList`) 
}

// 删除
export const RdTypeBodyFileSampleDelete = (parms:any) => {
    return service.post<any,any>(`/mes/pc/orderHead/delete`,parms) 
}

// 修改
export const RdTypeBodyFileSampleEdit = (parms:any) => {
    return service.post<any,any>(`/mes/pc/orderHead/update`,parms) 
}